package com.ylkj.web.action;

import java.util.Map;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class LogAction extends ActionSupport{
	private String name;
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String execute() throws Exception {
		if(name.equals("HelloWorld")){
			Map request=(Map)ActionContext.getContext().get("request");
			request.put("name",getName());
			return "yes";
		}else{
			return "no";
		}
	}
	/**
	 * 
	 * @return
	 * @throws Exception
	 */
	public String query() throws Exception
	{
		
		if(name.equals("HelloWorld")){
			Map request=(Map)ActionContext.getContext().get("request");
			request.put("name",getName());
			return "yes";
		}else{
			return "no";
		}
	}
}

